<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*" import="ibm.etp.bean.*"
	import="ibm.etp.test.*"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="ibm.etp.no5.Worker1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>所有员工</title>
</head>
<body bgcolor="#EEF2FB">
<%
  try{
   List  list = HibernateOracle.doHibernateOr("from Worker");
   out.println("<form action=\"update.action\" method=\"get\"><table border=\"1\"><tr><th>工号</th><th>用户名</th><th>密码</th><th>性别</th><th>年龄</th><th>入职日期</th><th>地址</th><th>工资</th><th>是否修改</th></tr>");
  for(int i=0;i<list.size();i++){
	  Worker worker = (Worker)list.get(i);
	  //使用JavaBean
	  //Worker worker = new Worker();
      
  
	  out.print("<tr><td><input name=\"wid1\" type=\"text\" value=\""+worker.getWid()+"\"></td>");	 
	  out.print("<td><input name=\"username\" type=\"text\" value=\""+worker.getUsername()+"\"></td>"); 
	  out.print("<td><input name=\"password\" type=\"text\" value=\""+worker.getPassword()+"\"></td>");
	  out.print("<td><input name=\"sex\" type=\"text\" value=\""+worker.getSex()+"\"></td>");
	  out.print("<td><input name=\"age\" type=\"text\" value=\""+worker.getAge()+"\"></td>");
	  out.print("<td><input name=\"wdate\" type=\"text\" value=\""+worker.getWdate()+"\"></td>");
	  out.print("<td><input name=\"address\" type=\"text\" value=\""+worker.getAddress()+"\"></td>");
	  out.print("<td><input name=\"salary\" type=\"text\" value=\""+worker.getSalary()+"\"></td><td><input name=\"wid\" type=\"radio\" value=\""+i+"\"/></td></tr>"); 
  }
  }catch(Exception e){
	  e.printStackTrace();
  }finally{
	  
   out.println("</table><br><input type=\"submit\" value=\"修改\"/></s:form>");
	
  }
 %>
 ${requestScope.message}<br>
</body>
</html>